<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta property="og:title" content="什么是 Open Graph 标签？不懂你还做什么社交营销优化？！">
  <meta property="og:site_name" content="ogp_site_name">
  <meta property="og:type" content="article">
  <meta property="og:url" content="http://www.watelab.com/what-is-open-graph-tags/">
  <meta property="og:image" content="http://www.watelab.com/uploads/cover-004.jpg">
  <meta property="og:description" content="Open Graph Protocol 开放图谱协议 ，简称 OG 协议或 OGP。">
  <title>OGP</title>
</head>

<body>
  <script>
    function countElements() {
      /**
       * @param ele {Node}
       */
      function recursive(ele) {
        if (ele.nodeType === Node.ELEMENT_NODE) { count++; }
        if (ele.hasChildNodes()) {
          ele.childNodes.forEach(node => recursive(node))
        }
      }

      let count = 0;
      recursive(document.querySelector('html'));
      return count
    }
  </script>
</body>

</html>